package com.dragon.mmochat.model.enumType;

public enum MmochatLifeSkillType {
	三魂炼丹术(0, "shd"), 七魄炼丹术(1, "qpd"), 妙手回春炼丹术(2, "mshcd"), 魂魄归位炼丹术(3, "hpgwd");

	int value;
	String shortName;
	int maxLevel = 0; // 最大技能等级
	int maxKeepRound = 0;// 最大保持回合数
	int maxDefendTimes = 0;// 最大有效次数
	double maxEffectValue = 0;// 最大数值

	MmochatLifeSkillType(int v, String s) {
		value = v;
		shortName = s;
	}

	public int getValue() {
		return value;
	}

	public String getShortName() {
		return shortName;
	}

	public static MmochatLifeSkillType get(int v) {
		for (MmochatLifeSkillType type : MmochatLifeSkillType.values()) {
			if (type.getValue() == v) {
				return type;
			}
		}
		return null;
	}

	// 根据短名称获取技能
	public static MmochatLifeSkillType getSkillByShortName(String sName) {
		for (MmochatLifeSkillType skill : MmochatLifeSkillType.values()) {
			if (skill.getShortName().equals(sName)) {
				return skill;
			}
		}
		return null;
	}

	public int getMaxLevel() {
		return maxLevel;
	}

	public void setMaxLevel(int maxLevel) {
		this.maxLevel = maxLevel;
	}

	public int getMaxKeepRound() {
		return maxKeepRound;
	}

	public void setMaxKeepRound(int maxKeepRound) {
		this.maxKeepRound = maxKeepRound;
	}

	public int getMaxDefendTimes() {
		return maxDefendTimes;
	}

	public void setMaxDefendTimes(int maxDefendTimes) {
		this.maxDefendTimes = maxDefendTimes;
	}

	public double getMaxEffectValue() {
		return maxEffectValue;
	}

	public void setMaxEffectValue(double maxEffectValue) {
		this.maxEffectValue = maxEffectValue;
	}

}
